ImageGear Professional v18.1 > User Guide > Getting Started > Developing an Application > Changing Image Display Settings > Align Mode |
Another display attribute is Align Mode. It determines where the image is displayed on the screen: in the center or aligned to the one of borders.
The mode can be specified with the IG_DSPL_ALIGN_ constants declared in dspl.h file.
The following code example specifies that the image will be displayed in the right-bottom corner of the screen:
Copy Code
|
|
---|---|
- (IBAction)mnuDisplayLayoutAlignRIGHT_BOTTOM:(id)sender { if(IG_image_is_valid(hIGear)) { // Set align mode to right-bottom IG_dspl_layout_set( hIGear, 0, IG_DSPL_ALIGN_MODE, NULL, NULL, NULL, 0, IG_DSPL_ALIGN_X_RIGHT|IG_DSPL_ALIGN_Y_BOTTOM, 0, 0.0 ); // Update main view [mainScrollViewOutlet setNeedsDisplay:YES]; } } |
In the sample below the image is aligned to right and bottom: